/*
 * Copyright 2002-2018 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.beans.factory;

/**
 * 在beanFactory设置所有属性后 做出 动作的 bean 实现接口
 * 比如说：执行自定义的初始化逻辑，或者对已经设置的属性进行校验。
 *
 * 实现当前接口的另一种方法是指定自定义inti方法，例如在 xml bean定义中。
 *
 * @author Rod Johnson
 * @author Juergen Hoeller
 * @see DisposableBean
 * @see org.springframework.beans.factory.config.BeanDefinition#getPropertyValues()
 * @see org.springframework.beans.factory.support.AbstractBeanDefinition#getInitMethodName()
 */
public interface InitializingBean {

	/**
	 * 在设置所有bean属性并满足 beanFactoryAware ，ApplicationContext 之后，被该bean的beanFactory调用。
	 * 这个方法允许 bean 实例在设置所有 bean 属性后执行其整体配置和最终的初始化验证。
	 */
	void afterPropertiesSet() throws Exception;

}
